package task07;

import java.util.Calendar;

/**
 * @author banana
 */
public class Test8 {
    public static void main(String[] args) {
        System.out.println("请输入一个月份");
        Calendar cal=Calendar.getInstance();
        int month=cal.get(Calendar.MONTH);
        month+=1;
        String season="";
        switch(month){
            case 3:
            case 4:
            case 5:
                season="春";
                break;
            case 6:
            case 7:
            case 8:
                season="夏";
                break;
            case 9:
            case 10:
            case 11:
                season="秋";
                break;
            default:
                System.out.println("冬");
                break;
        }
        System.out.println("当前月份是:"+month+"当前季节是："+season);
    }
}
